﻿using SQLite;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MusicExplorer.Data.Model
{
    [Table("Tracks")]
    public class Track
    {
        public static Track New(MusicExplorer.Model.Track trackModel)
        {
            return new Track()
            {
                ModelId = trackModel.Id,
                IsRead = trackModel.IsRead,
                RepositoryId = trackModel.Repository.Id
            };
        }

        //[PrimaryKey, Unique]
        //public int DatabaseId { get; set; }
        [MaxLength(255)]
        public string ModelId { get; set; }
        public Guid RepositoryId { get; set; }
        public bool IsRead { get; set; }
    }
}
